//
//  NSString+Extension.h
//  MiaMind
//
//  Created by Vill on 2023/11/23.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (Extension)

- (BOOL)strHasValue;

//MD5
+(NSString *)stringToMD5:(NSString *)inputStr;

/**
 *  写入系统偏好
 *
 *  @param value 写入键值
 */
- (void)keySaveToNSDefaultsWithValue:(id)value;
- (id)backNSDefaultsKey;

/**
 判断是否为合法邮箱地址
 */
+(BOOL)emailEvalunte:(NSString *)email;

/**
 获取字符串的首字母, 缺省为#
 */
+ (NSString*)firstChar:(NSString *)string;

// 读取本地JSON文件
+ (NSArray *)readLocalFileWithName:(NSString *)name;

// 根据国家代码获取国旗
+ (NSString *)emojiFlagForISOCountryCode:(NSString *)code;

+ (NSMutableAttributedString *)getAttributedStr:(NSString *)str image:(UIImage *)image font:(UIFont *)font index:(NSUInteger)index;


@end

NS_ASSUME_NONNULL_END
